/**
 * 
 */
package niuke.huawei;

import java.util.Scanner;

/**
 * @author zhongfang
 *
 */
public class 数据反序处理 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String string = scanner.nextLine();
		char c = string.charAt(0);
		boolean symbolTag = false;
		// 输出长度
		if (c == '+' || c == '-') {
			symbolTag = true;
			System.out.println(string.length() - 1);
		} else {
			System.out.println(string.length());
		}
		// 输出空格结果
		int start = 0;
		if (symbolTag) {
			System.out.print(c);
			start = 1;
		}
		StringBuilder sBuilder = new StringBuilder();
		for (int i = start; i < string.length(); i++) {
			sBuilder.append(string.charAt(i) + " ");
		}
		System.out.println(sBuilder.substring(0, sBuilder.length() - 1));

		if (symbolTag) {
			System.out.print(c);
		}
		for (int i = string.length() - 1; i >= start; i--) {
			System.out.print(string.charAt(i));
		}
	}

}
